package cn.icanci.nacos.user.controller;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author icanci
 * @since 1.0 Created in 2023/04/22 18:31
 */
@RestController
@RequestMapping("demoGateway")
public class DemoGatewayController {
    @GetMapping("header")
    public String header(HttpServletRequest request) {
        String header = request.getHeader("X-Request-red");
        return "X-Request-red:" + header;
    }

    @RequestMapping("param")
    public String header(String color) {
        return "color:" + color;
    }
}
